package com.example.administrator.hqq.base;

import android.graphics.Color;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;

import com.zyao89.view.zloading.ZLoadingDialog;
import com.zyao89.view.zloading.Z_TYPE;

/**
 * @name: HQQ
 * @describe:
 * @author: 康海涛 QQ2541849981
 * @time: 2018/11/14 10:35
 * @remark:
 */
public class MyFragemnt extends Fragment {

    private ZLoadingDialog dialog;

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        dialog = new ZLoadingDialog(getContext());
    }

    public void showLoadingDialog(){
        dialog.setLoadingBuilder(Z_TYPE.STAR_LOADING)//设置类型
                .setLoadingColor(Color.BLACK)//颜色
                .setHintText("Loading...")
                .show();

    }

    public void dismissLoadingDialog(){
        if (dialog!=null)
        dialog.dismiss();
    }
}
